﻿using System.Windows;
using Microsoft.Practices.Unity;
using Wizardry;

namespace Wizardry
{
    /// <summary>
    /// Interaction logic for WizardWindow.xaml
    /// </summary>
    public partial class WizardWindow : Window, IWizardWindow
    {
        public WizardWindow()
        {
            InitializeComponent();
        }

        [InjectionConstructor]
        public WizardWindow(IUnityContainer container)
        {
            InitializeComponent();

            this.DataContext = container.Resolve<IWizardViewModel>();
            this.ShowInTaskbar = false;
            this.Owner = Application.Current.MainWindow;
        }

        #region IWizardWindow Members

        public void SetController(IWizardController controller)
        {
            ((IWizardViewModel)this.DataContext).SetController(controller);
        }

        #endregion
    }
}
